<template>
  <div class="process">
    <div class="box">
      <svg-icon
        :class="{colorGlod : state === null}"
        style="width: 90px;height: 90px;"
        name="order-detail-submit"
      />
      <p>申请售后</p>
    </div>
    <span
      class="defaultSpot"
      :class="{glodSpot : state!=='1' && state!==null}"
      v-if="state===null"
    ></span>
    <div class="box" v-if="state==='1' || state===null">
      <svg-icon
        style="width: 90px;height: 90px; color: #999;"
        name="order-detail-list-1"
      />
      <p>订单处理</p>
    </div>
    <span class="defaultSpot" :class="{glodSpot : state!=='1' && state!==null}">
    </span>
    <div class="box">
      <svg-icon
        style="width: 90px;height: 90px; color: #999;"
        name="order-detail-express"
      />
      <p>退货中</p>
    </div>
    <span class="defaultSpot" :class="{glodSpot : state!=='1' && state!==null}">
    </span>
    <div class="box">
      <svg-icon
        style="width: 90px;height: 90px; color: #999;"
        name="order-detail-finish"
      />
      <p>完成</p>
    </div>
  </div>
</template>

<script setup>
import SvgIcon from '@/components/svgIcon/index.vue';
defineProps({
  state: Number || String
})
</script>
<style lang="scss" scoped>
.process{
    width: 100%;
    display: flex;
    text-align: center;
    align-items: center;
    margin-top: 100px;
    .box{
        flex: 1;
        img{
            width: 35px;
            height: 35px;
            margin-bottom: 20px;
        }
        p{
            font-size: 14px;
        }
    }
    .spot{
        width: 130px;
        position: relative;
        margin-top: 5px;
        img{
            width: 130px;
        }
        p{
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translate(-50%, 0);
        }
    }
    .defaultSpot{
        flex: 0.5;
        height: 0;
        border-bottom: 8px dotted #CCCCCC;
        span{
            position: relative;
            top: -20px;
        }
    }
    .glodSpot{
        border-color: $mainGlod;
    }
    .colorGlod{
        color: $mainGlod;
    }
}
</style>
